
<template>
    
    <tr>
        <td>
            <div><b>sessionid:</b>{{content.session_id}}</div>
            <div><b>ip:</b>{{content.ip}}</div>
            <div><b>id:</b>{{content.id}}</div>
            <div><b>run_uniqid:</b>{{content.run_uniqid}}</div>
        </td>
        <td>
            <div><b>url:</b>{{content.url}}</div>
            <div><b>url_m:</b>{{content.url_m}}</div>
        </td>
        <td>
            <div>{{content.get}}</div>
        </td>
        <td style="text-align: center;">
            <div v-if="isError"><Button type="error">有</Button></div>
            <div v-else>无</div>
        </td>
        <td style="text-align: center;">
            <Button type="primary" style="margin-bottom: 5px;" @click="goTrace()">查看trace</Button>
            <Button type="primary" @click="goInfo()">查看详情</Button>
        </td>
    </tr>
    
</template>
<script>

    export default {
        data(){
            return{
                isError:false
            }
        },
        props:{
            content:{
                required:true,
                type:Object
            },
            secretkey:{
                required:true,
                type:String
            }
        },
        components: {},
        created(){
            if(this.content.error == 1){
                this.isError = true;
            }else{
                this.isError = false;
            }
        },
        methods: {
            //跳转trace页
            goTrace(){
                this.$router.push('/trace/'+this.content.run_uniqid+'/'+this.secretkey);
            },
            //跳转info页
            goInfo(){
                this.$router.push('/log_info/'+this.content.id+'/'+this.secretkey);
            }
        }

    };
</script>
<style scoped>
td{
    font-size: 14px;
    padding: 5px;
}
td div{
    border-bottom: 1px dashed #ccc;
    padding: 5px 0;
}
td div:last-child{
    border-bottom: none;
}
.red{
    color: red;
}
b{
    margin-right: 5px;
}
</style>